<script type="text/javascript">
  function ULen(str)
  {
    regex = new RegExp("^[\u4e00-\u9fa5|\uFF00-\uFFFF]+$");
    var nLength = str.length;
    for(var i=0; i<str.length; i++)
    {
    if (regex.test(str.substring(i,i+1)))  
      nLength++;
    }
    return nLength;

  }	
  function FillSpace(str,len){
    var u=ULen(str.toString());
    if(u%2!=0){
        str+=" ";
        u+=1;
    }
    var sp = new Array((len-u)/2+1).join("　");
    return str+sp;
  }
  function isnumber(s){
    s=$.trim(s);
    if(isNaN(s)||s==""){
      return false;
    }else{
      return true;
    }
  }
  function tonumber(s){
    if(isnumber(s)){
      s=parseFloat(s);
    }else{
      s=0;
    }
    return s;
  }
</script>
